import request from '../service/service';

// 技术管理

/**
 * 最新一份设计计划的内容查询（分页）
 */
export function getDesignPlan(data) {
  return request({
    protocol: 'technology/get_design_plan',
    options: data
  });
}

/**
 * 设计计划上传
 */
export function designPlanUpload(data) {
  return request({
    protocol: 'technology/design_plan_upload',
    options: data,
    method: 'formData',
    requestConfig: {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    }
  });
}

/**
 * 最新一份设计计划关键词模糊查询（分页）
 */
export function fuzzySearchDesignPlan(data) {
  return request({
    protocol: 'technology/fuzzy_search_design_plan',
    options: data
  });
}

/**
 * 设计计划历史文件查询（分页 包含最新的一个设计计划文件)
 */
export function getHistoryDesignPlan(data) {
  return request({
    protocol: 'technology/get_design_plan_file',
    options: data
  });
}

/**
 * 删除设计计划文件
 */
export function deleteDesignPlanFile(data) {
  return request({
    protocol: 'technology/delete_design_plan_file',
    options: data
  });
}

/**
 * 设计方案上传
 */
export function designProgrammeUpload(data) {
  return request({
    protocol: 'technology/design_programme_upload',
    options: data,
    method: 'formData',
    requestConfig: {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    }
  });
}

/**
 * 设计方案文件查询（分页）
 */
export function getDesignProgrammeFile(data) {
  return request({
    protocol: 'technology/get_design_programme_file',
    options: data
  });
}

/**
 * 删除设计方案文件
 */
export function deleteDesignProgrammeFile(data) {
  return request({
    protocol: 'technology/delete_design_programme_file',
    options: data
  });
}

/**
 * 技术交底上传
 */
export function technicalDisclosureFileUpload(data) {
  return request({
    protocol: 'technology/technical_disclosure_file_upload',
    options: data,
    method: 'formData',
    requestConfig: {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    }
  });
}

/**
 * 技术交底文件查询（分页）
 */
export function getTechnicalDisclosureFile(data) {
  return request({
    protocol: 'technology/get_technical_disclosure_file',
    options: data
  });
}

/**
 * 删除技术交底文件
 */
export function deleteTechnicalDisclosureFile(data) {
  return request({
    protocol: 'technology/delete_technical_disclosure_file',
    options: data
  });
}

/**
 * 技术交底文件名的关键词模糊查询（分页）
 */
export function fuzzySearchTechnicalDisclosureFile(data) {
  return request({
    protocol: 'technology/fuzzy_search_technical_disclosure_file',
    options: data
  });
}

/**
 * 变更上传
 */
export function changeFileUpload(data) {
  return request({
    protocol: 'technology/change_file_upload',
    options: data,
    method: 'formData',
    requestConfig: {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    }
  });
}

/**
 * 变更文件查询（分页）
 */
export function getChangeFile(data) {
  return request({
    protocol: 'technology/get_change_file',
    options: data
  });
}

/**
 * 删除变更文件
 */
export function deleteChangeFile(data) {
  return request({
    protocol: 'technology/delete_change_file',
    options: data
  });
}

/**
 * 变更 文件名的关键词模糊查询（分页）
 */
export function fuzzySearchChangeFile(data) {
  return request({
    protocol: 'technology/fuzzy_search_change_file',
    options: data
  });
}

/**
 * 方案管理上传
 */
export function programmeFileUpload(data) {
  return request({
    protocol: 'technology/programme_file_upload',
    options: data,
    method: 'formData',
    requestConfig: {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    }
  });
}

/**
 * 方案管理文件查询
 */
export function getProgrammeFile(data) {
  return request({
    protocol: 'technology/get_programme_file',
    options: data,
    method: 'post'
  });
}

/**
 * 方案管理文件模糊查询
 */
export function fuzzySearchProgrammeFile(data) {
  return request({
    protocol: 'technology/fuzzy_search_programme_file',
    options: data,
    method: 'post'
  });
}

/**
 * 删除方案管理文件
 */
export function deleteProgrammeFile(data) {
  return request({
    protocol: 'technology/delete_programme_file',
    options: data,
    method: 'post'
  });
}

/**
 * 设计方案 文件名的关键词模糊查询
 */
export function fuzzySearchProgrammePlan(data) {
  return request({
    protocol: 'technology/fuzzy_search_programme_plan',
    options: data,
    method: 'post'
  });
}

/**
 * 获取技术管理树
 * @desc majorType 1：图纸；2：施工；3：变更；4：交底；5：模型
 */
export function getTechTree(data) {
  return request({
    protocol: '/bus/tech/major/tree',
    options: data,
    method: 'get'
  });
}

/**
 * 新增技术管理树
 */
export function addTechTree(data) {
  return request({
    protocol: '/bus/tech/major/create',
    options: data,
    method: 'post'
  });
}

/**
 * 删除技术管理树
 */
export function delTechTree(data) {
  return request({
    protocol: '/bus/tech/major/deleteById',
    options: data,
    method: 'delete'
  });
}

/**
 * 修改技术管理树
 */
export function updateTechTree(data) {
  return request({
    protocol: '/bus/tech/major/update',
    options: data,
    method: 'post'
  });
}

/**
 * 获取图纸、施工文件
 */
export function getTechFileList(data) {
  return request({
    protocol: '/bus/tech/file/findPage',
    options: data,
    method: 'get'
  });
}

/**
 * 新增图纸、施工文件
 */
export function addTechFile(data) {
  return request({
    protocol: '/bus/tech/file/create',
    options: data,
    method: 'post'
  });
}

/**
 * 删除图纸、施工文件
 */
export function delTechFile(data) {
  return request({
    protocol: '/bus/tech/file/deleteByIds',
    options: data,
    method: 'delete'
  });
}

/**
 * 修改图纸、施工文件
 */
export function updateTechFile(data) {
  return request({
    protocol: '/bus/tech/file/update',
    options: data,
    method: 'post'
  });
}

/**
 * 获取交底管理列表
 */
export function getTechDisclose(data) {
  return request({
    protocol: '/bus/tech/disclose/findPage',
    options: data,
    method: 'get'
  });
}

/**
 * 新增交底管理
 */
export function addTechDisclose(data) {
  return request({
    protocol: '/bus/tech/disclose/create',
    options: data,
    method: 'post'
  });
}

/**
 * 删除交底管理
 */
export function delTechDisclose(data) {
  return request({
    protocol: '/bus/tech/disclose/deleteByIds',
    options: data,
    method: 'delete'
  });
}

/**
 * 修改交底管理
 */
export function updateTechDisclose(data) {
  return request({
    protocol: '/bus/tech/disclose/update',
    options: data,
    method: 'post'
  });
}

/**
 * 获取变更管理
 */
export function getTechChange(data) {
  return request({
    protocol: '/bus/tech/change/findPage',
    options: data,
    method: 'get'
  });
}

/**
 * 新增变更管理
 */
export function addTechChange(data) {
  return request({
    protocol: '/bus/tech/change/create',
    options: data,
    method: 'post'
  });
}

/**
 * 删除变更管理
 */
export function delTechChange(data) {
  return request({
    protocol: '/bus/tech/change/deleteByIds',
    options: data,
    method: 'delete'
  });
}

/**
 * 修改变更管理
 */
export function updateTechChange(data) {
  return request({
    protocol: '/bus/tech/change/update',
    options: data,
    method: 'post'
  });
}
